export class App {
   private _id: string;
   private _url: string;
   private _name: string;
   private _icon: string;
   private _description: string
   private _selected: boolean;

   constructor(id: string, name: string, url: string, icon: string = 'shumajiadian', description: string = '暂无', selected: boolean){
       this._id = id;
       this._name = name;
       this._url = url;
       this._icon = icon;
       this._description = description;
       this._selected = selected;
   }

   get id(){
       return this._id;
   }
   get name(){
       return this._name;
   }
   get url(){
       return this._url;
   }
   get icon(){
       return this._icon;
   }
   get selected(){
       return this._selected;
   }
   get description(){
       return this._description;
   }
   set id(value: string){
       this._id = value;
   }
   set name(value: string){
       this._name = value;
   }
   set url(value: string){
       this._url = value;
   }
   set icon(value: string){
       this._icon = value;
   }
   set description(value: string){
       this._description = value;
   }
   set selected(value: boolean){
       this._selected = value;
   }

   toJSON() {
       return {
           id: this.id,
           name: this.name,
           url: this.url,
           icon: this.icon,
           description: this.description,
           selected: this.selected
       }
   }
}